package vip.web3.common.enums;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 *  功能描述: 交易对状态枚举
 */
@Getter
@RequiredArgsConstructor
public enum RewardsTypeEnum {

    /** 直推奖励 */
    RECOMMEND(1, "直推奖励"),

    /** 全网分红 */
    NETWORK(2, "全网分红"),

    /** 激励分红 */
    STIMULATE(3, "激励分红"),

    /** 业绩分红 */
    PERFORMANCE (4, "业绩分红"),

    /** 公司奖励 */
    TOP (5, "top 奖励"),

    /** 业绩奖励 */
    BASIC (6, "基础产出"),

    ;

    private final int type;
    private final String desc;

    /**
     * 根据传入的状态获取描述信息
     * @param type
     * @return
     */
    public static String getDescByType(int type) {
        for (RewardsTypeEnum statusEnum : RewardsTypeEnum.values()) {
            if (statusEnum.getType() == type) {
                return statusEnum.getDesc();
            }
        }
        return null;
    }

}